#include <iostream>
#include <vector>
#include "boost/range/combine.hpp"
#include "boost/any.hpp"
#include "boost/foreach.hpp"

#include "test_base.h"

void zip_combine() {
    std::string str = "abcde";
    std::vector<int> vec = {1, 2, 3, 4, 5};
    std::vector<std::string> v_str{"11", "22", "33", "44", "55"};

    for (const auto & zipped : boost::combine(str, vec, v_str)) {
        char c; int i; std::string s;
        boost::tie(c, i, s) = zipped;

        std::cout << "(" << c << ", " << i << ", " << s << ")" << std::endl;
    }

    char tc;
    int ti;
    std::string s;
    BOOST_FOREACH(boost::tie(ti, tc, s), boost::combine(vec, str, v_str))
    {
        std::cout << "(" << tc << ", " << ti << ", " << s << ")" << std::endl;
    }
}

int main() {
    zip_combine();
}